package com.kfm.base.thread.day03;

public class Demo {

    public static void main(String[] args) {
        WaitThread t1 = new WaitThread();

        t1.start();
    }
}

class  WaitThread extends Thread {

    @Override
    public synchronized void run(){

        System.out.println("睡了");
        try {
            wait(3000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("醒了");
    }
}
